﻿<%@ Page Title="" Language="C#" MasterPageFile="~/master/admin.master" AutoEventWireup="true" CodeFile="insert.aspx.cs" Inherits="aspx_admin_teacher_insert" ValidateRequest="false" %>

<asp:Content ID="Content1" ContentPlaceHolderID="Title" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="HeadContent" runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="Server">

    <asp:FormView ID="FormView1" runat="server" DataKeyNames="名师ID" DataSourceID="ods名师风采" DefaultMode="Insert" OnItemInserting="FormView1_ItemInserting">

        <InsertItemTemplate>
            <table>
                <tr>
                    <td>姓名：
                    </td>
                    <td>
                        <asp:TextBox ID="姓名TextBox" runat="server" Text='<%# Bind("姓名") %>' Columns="50"
                            CausesValidation="true" />
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" ErrorMessage="*" Display="Dynamic" ControlToValidate="姓名TextBox"
                            runat="server" />
                    </td>
                </tr>
                <tr>
                    <td>名师等级：
                    </td>
                    <td>
                        <asp:DropDownList runat="server" ID="ddl名师等级" SelectedValue='<%# Bind("名师等级") %>'>
                            <asp:ListItem Value="国家级" />
                            <asp:ListItem Value="省级" />
                            <asp:ListItem Value="校级" />
                            <asp:ListItem Value="其他" />
                        </asp:DropDownList>
                    </td>
                </tr>

                <tr>
                    <td>小图片：（要显示在首页上，只能使用jpg格式才可以）
                    </td>
                    <td>
                        <asp:FileUpload ID="fu" runat="server" />
                    </td>
                </tr>
                <tr>
                    <td>
                        重要性值：</td>
                    <td>
                        <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("重要性") %>'></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td></td>
                    <td>
                        <asp:CheckBox ID="校内CheckBox" runat="server" Checked='<%# Bind("校内") %>' Text="校内老师" />
                        <asp:CheckBox ID="显示在首页CheckBox" runat="server" Checked='<%# Bind("显示在首页") %>' Text="显示小图片在首页" />
                    </td>
                </tr>

                <tr>
                    <td colspan="2">名师简介：
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator3" ErrorMessage="*" Display="Dynamic"
                            ControlToValidate="简介TextBox" runat="server" /> *  <asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" CommandName="Insert"
                            CssClass="btn" Text="发布" />
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <asp:TextBox ID="简介TextBox" runat="server" Columns="80" Rows="16" Text='<%# Bind("简介") %>'
                            TextMode="MultiLine" CausesValidation="true" />
                    </td>
                </tr>


            </table>
        </InsertItemTemplate>
    </asp:FormView>
    <asp:ObjectDataSource ID="ods名师风采" runat="server" DeleteMethod="Delete" InsertMethod="Insert" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="ds_名师讲堂TableAdapters.tb_名师风采TableAdapter" UpdateMethod="Update">
        <DeleteParameters>
            <asp:Parameter Name="Original_名师ID" Type="Int32" />
        </DeleteParameters>
        <InsertParameters>
            <asp:Parameter Name="名师等级" Type="String" />
            <asp:Parameter Name="校内" Type="Boolean" />
            <asp:Parameter Name="姓名" Type="String" />
            <asp:Parameter Name="虚目录" Type="String" />
            <asp:Parameter Name="简介" Type="String" />
            <asp:Parameter Name="显示在首页" Type="Boolean" />
        </InsertParameters>
        <UpdateParameters>
            <asp:Parameter Name="名师等级" Type="String" />
            <asp:Parameter Name="校内" Type="Boolean" />
            <asp:Parameter Name="姓名" Type="String" />
            <asp:Parameter Name="虚目录" Type="String" />
            <asp:Parameter Name="简介" Type="String" />
            <asp:Parameter Name="显示在首页" Type="Boolean" />
            <asp:Parameter Name="Original_名师ID" Type="Int32" />
        </UpdateParameters>
    </asp:ObjectDataSource>
</asp:Content>